package com.chunayev.numerology.gui.table;

import javax.swing.JTable;

/**
 * @author Sergey Chunayev
 */
public class NumerologicTable extends JTable {
    
    /**
     * 
     */
    private static final long serialVersionUID = -5712286336055984380L;
    
    /**
     * @return the serialVersionUID
     */
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }
    
    private int mainPosition = -1;
    
    private String mainToolTip;
    
    private int otherPostion = -1;
    
    private String otherToolTip;
    
    /**
     * 
     */
    public NumerologicTable() {
        super(new NumerologicTableModel());
        getTableHeader().setReorderingAllowed(false);
        setDefaultRenderer(String.class, new NumerologicCellRenderer());
        
        setRowHeight(35);
    }
    
    /**
     * @return the position
     */
    public int getMainPosition() {
        return this.mainPosition;
    }
    
    /**
     * @return the mainToolTip
     */
    public String getMainToolTip() {
        return this.mainToolTip;
    }
    
    /*
     * (non-Javadoc)
     * @see javax.swing.JTable#getModel()
     */
    @Override
    public NumerologicTableModel getModel() {
        return (NumerologicTableModel) super.getModel();
    }
    
    /**
     * @return the otherPostion
     */
    public int getOtherPostion() {
        return this.otherPostion;
    }
    
    /**
     * @return the otherToolTip
     */
    public String getOtherToolTip() {
        return this.otherToolTip;
    }
    
    /**
     * @param position
     *            the position to set
     */
    public void setMainPosition(final int position) {
        this.mainPosition = position;
    }
    
    /**
     * @param mainToolTip
     *            the mainToolTip to set
     */
    public void setMainToolTip(final String mainToolTip) {
        this.mainToolTip = mainToolTip;
    }
    
    /**
     * @param otherPostion
     *            the otherPostion to set
     */
    public void setOtherPostion(final int otherPostion) {
        this.otherPostion = otherPostion;
    }
    
    /**
     * @param otherToolTip
     *            the otherToolTip to set
     */
    public void setOtherToolTip(final String otherToolTip) {
        this.otherToolTip = otherToolTip;
    }
    
}
